import React from 'react'
import { ListItemState } from '../activeComp'
import "./style.scss"

interface PropsType extends ListItemState {
	onClick?: () => void
}

export const ListItem: React.FC<PropsType> = ({ title, url, avator, nickname, desc, onClick }) => {
	return (
		<div className='list-item' onClick={ onClick }>
       <h4>
				<img src={avator} alt="" />
				<span>{ nickname }</span>
			 </h4>
			 <h2>{ title }</h2>
			 <div>
				<p>{ desc }</p>
				<img src={url} alt="" />
			 </div>
		</div>
	)
}